<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" name="viewport">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="telephone=no" name="format-detection">
<title>苗木通讯录</title>
<include file="Public/header"/>
</head>
<body >
<div class=" wrap">
	<form method="post" action="">
		<div class="top">
			<i class="fa fa-angle-left fa-2x top_l" onclick="window.location.href='{:U('Index/editlist')}'"></i>
			
			<i class="fa fa-phone fa-lg top_r" id="telephone"></i>
		</div>
		<div class="login_con" style="margin-top:60px;">
			<div class="input-group">
			  <span class="input-group-addon">姓名：</span>
			  <input type="text" name="nickname" class="form-control" aria-label="" value="{$info['nickname']}">
			</div>
			<div class="input-group">
			  <span class="input-group-addon">单位：</span>
			  <input type="text" name="company"class="form-control" aria-label="" value="{$info['company']}">
			</div>
			<div class="input-group" >
			  <span class="input-group-addon">地址：</span>
			  <input type="text" name="address" class="form-control" aria-label="" value="{$info['address']}">
			</div>
			<div class="input-group" >
			    <span class="input-group-addon">省市：</span>
				<div id="city_1">
					<select class="prov form-control" style="width:100px; height:40px; line-height:40px; margin-top:5px;" name="province"></select> 
					<select class="city form-control" style="width:100px; height:40px; line-height:40px; margin-top:5px;" name="city" disabled="disabled"></select>
				</div>
			</div>

			<div id="tellist">
				<if condition="$mobilearr">
				<volist id="mobilearr" name="mobilearr">
				<div class="input-group">
				  <span class="input-group-addon">电话：</span>
				  <input type="text" name="mobile[]" class="form-control" aria-label="" value="{$mobilearr}" style="width:50%;">
				  <i class="fa fa-plus fa-lg" aria-hidden="true" style="line-height:50px;padding-left:5px;color:#ccc;" onclick="addlist(this)"></i>
				  <i class="fa fa-minus fa-lg" aria-hidden="true" style="line-height:50px;padding-left:5px;color:#ccc;" onclick="removelist(this)"></i>
				</div>
				</volist>
			<else/>
				<div class="input-group">
				  <span class="input-group-addon">电话：</span>
				  <input type="text" name="mobile[]" class="form-control" aria-label="" value="" style="width:50%;">
				  <i class="fa fa-plus fa-lg" aria-hidden="true" style="line-height:50px;padding-left:5px;color:#ccc;" onclick="addlist(this)"></i>
				</div>
			</if>
			</div>

			<div class="input-group">
			  <span class="input-group-addon">Q  Q：</span>
			  <input type="text" name="qq" class="form-control" aria-label="" value="{$info['qq']}">
			</div>
			<div class="input-group">
			  <span class="input-group-addon">微信账号：</span>
			  <input type="text" name="weixinid" class="form-control" aria-label="" value="{$info['weixinid']}">
			</div>
			<div class="input-group" style="border: 0px none;">
			  <span class="input-group-addon">介绍：</span>
			  <textarea class="dh" rows="15" name="content">{$info['content']}</textarea>
			</div>
		</div>
		<button class="btn" type="submit">确认提交</button>
		</div>
	</form>
	<include file="Public/footern"/>
</div>
<div id="item" style="display:none;">
	<div class="input-group">
	  <span class="input-group-addon">电话：</span>
	  <input type="text" name="mobile[]" class="form-control" aria-label="" style="width:50%;" value="">
	  <i class="fa fa-plus fa-lg" aria-hidden="true" style="line-height:50px;padding-left:5px;color:#ccc;" onclick="addlist(this)"></i>
	  <i class="fa fa-minus fa-lg" aria-hidden="true" style="line-height:50px;padding-left:5px;color:#ccc;" onclick="removelist(this)"></i>
	</div>
</div>
</body>
</html>
<script type="text/javascript" src="__PUBLIC__/city/jquery.cityselect.js"></script>
<script>
$(function() {
	$('#active4').css("color","#2abc7c");
	$('#active4').find('i').css("color","#2abc7c");
	$("#city_1").citySelect({
		nodata: "none",
		required: false,
		<if condition="$info['province']">
			prov:"{$info['province']}",
		</if>

		<if condition="$info['city']">
			city:"{$info['city']}"
		</if>
	});
});

function addlist(self) {
	var html = $('#item').html();
	$(self).parent().after(html);
}

function removelist(self) {
	var html = $('#item').html();
	$(self).parent().remove();
}
</script>
